package com.example.context;

import lombok.Data;

/**
 * 用户上下文信息
 */
@Data
public class UserContext {
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 用户名
     */
    private String username;
    
    public UserContext() {}
    
    public UserContext(Long userId, String username) {
        this.userId = userId;
        this.username = username;
    }
    
    @Override
    public String toString() {
        return "UserContext{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                '}';
    }
}
